import VueRouter from "vue-router";

//导入各个组件
import homeContainer from "./components/tabbar/home.vue"
import memberContainer from "./components/tabbar/member.vue"
import shopcartContainer from "./components/tabbar/shopcart.vue"
import searchContainer from "./components/tabbar/search.vue"


var router = new VueRouter({
    routes:[
        // 进行重定向
        {path:"/",redirect:"/home"},
        //根据路由进行组件分配
        {path:"/home",component: homeContainer},
        {path:"/member",component: memberContainer},
        {path:"/shopping-cart",component: shopcartContainer},
        {path:"/search",component: searchContainer},
    ],
    //由于router-link默认带一个类名（选中时携带）router-link-active，可以
    // 用下面这个属性进行类名替换，mui中点击高亮显示的类名为mui-active,即可将
    // 类名替换为mui-active
    linkActiveClass:'mui-active'
})
export default router
